<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<title>后台管理</title>
	<link rel="stylesheet" type="text/css" href="./res/css/css.css" />
    <script type="text/javascript" src="./res/js/selecttime.js"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
	<div id="body">
		<div class="title">修改项目</div>
		<div style="padding:5px;"></div>
		<form method="post" action="index.php?ctl=item&act=edit&a=d" name="add" onsubmit="return checkform();" style="margin:0px;">
		<table width="100%" cellspacing="1" cellpadding="4">
        <input type="text" name="id" id="id" style="display:none;" value="<{$item.id}>" />
		<tr>
			<td width="120">所属帐号ID：</td>
			<td><select name="user_id">
                <{foreach from=$userlist item=l key=key}>
                	<option value="<{$l.id}>" <{if $item.user_id eq $l.id}>selected="selected"<{/if}>><{$l.company}>-<{$l.account}></option>
                <{/foreach}>
                </select></td>
		</tr>
		<tr>
			<td>项目编码：</td>
			<td><input type="text" name="project_code" id="project_code" value="<{$item.project_code}>"/>
			</td>
		</tr>
     
        <tr>
			<td>开始时间：</td> 
			<td>
            <input type="text" name="start_time" id="start_time" value="<{$item.start_time}>" readOnly onClick="setDayHM(this);" /></td>
		</tr>
        <tr>
			<td>结束时间：</td>
			<td><input type="text" name="end_time" id="end_time" value="<{$item.end_time}>" readOnly onClick="setDayHM(this);" /></td>
		</tr>
        <tr>
			<td>项目状态：</td>
			<td><input type="radio" name="state" id="state" value="1" <{if $item.state eq 1}> checked <{/if}> style="border:0px;" />未开始
				<input type="radio" name="state" id="state" value="2"  <{if $item.state eq 2}> checked <{/if}> style="border:0px;" /><span style="color:ff33ff;">已开始</span>
                <input type="radio" name="state" id="state" value="3"  <{if $item.state eq 3}> checked <{/if}> style="border:0px;" />已结束
				<input type="radio" name="state" id="state" value="4"  <{if $item.state eq 4}> checked <{/if}>style="border:0px;" /><span style="color:ff33ff;">已关闭</span>
				
			</td>
		</tr>
		
	
		<tr>
			<td>项目标题：</td>
			<td><input type="text" name="title" id="title" value="<{$item.title}>"/> </td>
		</tr>
		<tr>
			<td>项目介绍：</td>
			<td><textarea name="introduction" id="introduction"  value="<{$item.introduction}>"></textarea></td>
		</tr>
        

		</table>
		<div style="text-align:center;padding:5px;">
			<input type="submit" value="提交" /> 　
			<input type="reset" value="重置" />
		</div>
		</form>
	</div>
<script LANGUAGE='javascript'>
function showhelp(sid){
	var ee = document.getElementById("help"+sid);
	if(ee.style.display == "none") {ee.style.display = "block";}
	else {ee.style.display = "none"}
}
function checkform(){

	var str_reg=/^\w+((-\w+)|(\.\w+))*\@{1}\w+\.{1}\w{2,4}(\.{0,1}\w{2}){0,1}/ig;
	if (document.add.email.value.search(str_reg) == -1)
	{
		alert("温馨提示！邮箱格式错误！");
		document.add.email.value = "";
		document.add.email.focus();
		return false;
	}
	return true;
}
top.document.title=" 后台管理系统 - 修改项目";
</script>

</body>
</html>
